<#include "/common/defaultEngine.html"/>
<@pageTheme mark="${config.optimize()?string('true', 'false')}">
<@header title="新增置换信息表" bodyClass="white-bg" libs=["prism","bootstrapSelect","ueditor"]/>
<div class="wrapper wrapper-content ibox-content">
    <@form.form id="form-substitution-add"  class="form-horizontal">
    <input name="id" type="hidden" value="${bpmCrmSubstitution.id}">
    <input name="saleOrderNumber" type="hidden" value="${bpmCrmSubstitution.saleOrderNumber}">
    <input name="processStatus" value="2" class="form-control" type="hidden">
    <div class="form-group"><label class="col-sm-3 control-label"><@ctx.i18n text = "流水号"/>：
    </label>
        <div class="col-sm-8"><input class="form-control" type="text" value="${bpmCrmSubstitution.saleOrderNumber?default('')}" readonly="true">
        </div>
    </div>
    <div class="form-group"><label class="col-sm-3 control-label"><@ctx.i18n text = "销售员"/>：
    </label>
        <div class="col-sm-8"><input class="form-control" type="text" value="${bpmCrmSubstitution.saleUsername?default('')}" readonly="true">
        </div>
    </div>
    <div class="form-group"><label class="col-sm-3 control-label"><@ctx.i18n text = "销售订单编号"/>：
    </label>
        <div class="col-sm-8"><input class="form-control" type="text" value="${bpmCrmSubstitution.saleCode?default('')}" readonly="true">
        </div>
    </div>
    <div class="form-group"><label class="col-sm-3 control-label"><@ctx.i18n text = "车辆识别号"/>：
    </label>
        <div class="col-sm-8"><input class="form-control" type="text" value="${bpmCrmSubstitution.outCarVin?default('')}" readonly="true" >
        </div>
    </div>
    <div class="form-group"><label class="col-sm-3 control-label"><@ctx.i18n text = "车型"/>：
    </label>
        <div class="col-sm-8"><input class="form-control" type="text" value="${bpmCrmSubstitution.outCarVehicle?default('')}" readonly="true">
        </div>
    </div>
    <div class="form-group"><label class="col-sm-3 control-label"><@ctx.i18n text = "换入车辆识别号"/>：
    </label>
        <div class="col-sm-8"><input class="form-control" type="text" value="${bpmCrmSubstitution.inCarVin?default('')}"  readonly="true">
        </div>
    </div>
    <div class="form-group"><label class="col-sm-3 control-label"><@ctx.i18n text = "换入车辆/车型"/>：
    </label>
        <div class="col-sm-8"><input class="form-control" type="text" value="${bpmCrmSubstitution.inCarVehicle?default('')}"  readonly="true">
        </div>
    </div>
    <div class="form-group"><label class="col-sm-3 control-label"><@ctx.i18n text = "车辆里程"/>：
    </label>
        <div class="col-sm-8"><input class="form-control" type="text" value="${bpmCrmSubstitution.inCarMileage?default('')}"  readonly="true">
        </div>
    </div>
    <div class="form-group"><label class="col-sm-3 control-label"><@ctx.i18n text = "要价/置换价"/>：
    </label>
        <div class="col-sm-8"><input class="form-control" type="text" value="${bpmCrmSubstitution.inCarAskprice?default('')}"  readonly="true">
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><@ctx.i18n text = "折价备注"/>：</label>
        <div class="col-sm-8">
            <textarea class="form-control" readonly="true">${bpmCrmSubstitution.inCarTradememo?default('')}</textarea>
        </div>
    </div>
    <#if bpmCrmSubstitution.processStatus==1 >
        <div class="form-group">
            <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "审核备注"/>：</label>
            <div class="col-sm-8">
                <textarea name="purchaseRemark" class="form-control" required></textarea>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "是否收购"/>：</label>
            <div class="col-sm-8">
                  <@form.radio name="purchaseIsbuy" dictType="sys_crm_isOrNo" value="${bpmCrmSubstitution.purchaseIsbuy?default('1')}"  />
            </div>
        </div>
        <div class="form-group"><label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "估价"/>：
           </label>
            <div class="col-sm-8"><input name="purchaseEvaluation" class="form-control" type="number" required>
            </div>
         </div>
    </#if>
    <#if bpmCrmSubstitution.processStatus!=1 >
        <div class="form-group">
            <label class="col-sm-3 control-label"><@ctx.i18n text = "审核备注"/>：</label>
            <div class="col-sm-8">
                <textarea name="purchaseRemark" class="form-control" readonly="true">${bpmCrmSubstitution.purchaseRemark?default('')}</textarea>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label"><@ctx.i18n text = "是否收购"/>：</label>
            <div class="col-sm-8">
                <@form.radio name="purchaseIsbuy" dictType="sys_crm_isOrNo" readOnly="true" value="${bpmCrmSubstitution.purchaseIsbuy?default('')}" />
            </div>
        </div>
        <div class="form-group"><label class="col-sm-3 control-label"><@ctx.i18n text = "估价"/>：
        </label>
            <div class="col-sm-8"><input name="purchaseEvaluation" class="form-control" type="text" value="${bpmCrmSubstitution.purchaseEvaluation?default('')}" readonly="true">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label"><@ctx.i18n text = "入库检查"/>：</label>
            <div class="col-sm-8">
                  <@form.radio name="warehouseInCheck" dictType="sys_bpm_crm_passorclose" readOnly="true" value="${bpmCrmSubstitution.warehouseInCheck?default('')}" />
            </div>
        </div>
        <div class="form-group"><label class="col-sm-3 control-label"><@ctx.i18n text = "入库估价"/>：
           </label>
            <div class="col-sm-8"><input name="warehouseInEvaluation" class="form-control" type="text"  value="${bpmCrmSubstitution.warehouseInEvaluation?default('')}" readonly="true">
            </div>
         </div>
        <div class="form-group">
            <label class="col-sm-3 control-label"><@ctx.i18n text = "入库备注"/>：</label>
            <div class="col-sm-8">
                <textarea name="warehouseInRemark" class="form-control" readonly="true">${bpmCrmSubstitution.warehouseInRemark?default('')}</textarea>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label"><@ctx.i18n text = "入库文件"/>：</label>
            <div class="col-sm-8">
                  <@form.radio name="warehouseInFile" dictType="sys_bpm_crm_passorclose" readOnly="true" value="${bpmCrmSubstitution.warehouseInFile?default('')}" />
            </div>
        </div>
        <div class="form-group"><label class="col-sm-3 control-label"><@ctx.i18n text = "入库备注"/>：
           </label>
            <div class="col-sm-8"><input name="filehumanInRemark" class="form-control" type="text" value="${bpmCrmSubstitution.filehumanInRemark?default('')}" readonly="true" >
            </div>
         </div>
        <div class="form-group">
            <label class="col-sm-3 control-label"><@ctx.i18n text = "出纳审核"/>：</label>
            <div class="col-sm-8">
                  <@form.radio name="checkmoneyCashierReview" dictType="sys_bpm_crm_passorclose" value="${bpmCrmSubstitution.checkmoneyCashierReview?default('')}" readOnly="true" />
            </div>
        </div>
        <div class="form-group"><label class="col-sm-3 control-label"><@ctx.i18n text = "证明"/>：
           </label>
            <div class="col-sm-8">

                <div class="layui-upload">
                    <div class="layui-upload-list layui-upList-minHeight uploadpadding">
                        <table class="layui-table">
                            <thead>
                            <tr>
                                <th>文件名</th>
                                <th>大小</th>
                                <th>状态</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody id="demojiazhaoList1">
                            <tr id="upjiazhaoload1"></tr>
                            <#list proof as item>
                            <tr id="upload${item_index}1">
                                <td> ${item.fileName?default("")}</td>
                                <td> ${item.fileSize?default("")}</td>
                                <td>已上传</td>
                                <td>
                                    <a class="btn btn-danger btn-sm" href="#" download="${item.url}"><i class="fa fa-download"></i></a>
                                </td>
                            </tr>
                            </#list>
                            </tbody>
                        </table>
                    </div>
                </div>

            </div>
         </div>
        <div class="form-group"><label class="col-sm-3 control-label"><@ctx.i18n text = "贷款金额审核"/>：
           </label>
            <div class="col-sm-8"><input name="checkmoneyLoanamountreceived" class="form-control" type="text" value="${bpmCrmSubstitution.checkmoneyLoanamountreceived?default('')}" readonly="true" >
            </div>
         </div>
        <div class="form-group"><label class="col-sm-3 control-label"><@ctx.i18n text = "收据编号"/>：
           </label>
            <div class="col-sm-8"><input name="checkmoneyReceiptnumber" class="form-control" type="text" value="${bpmCrmSubstitution.checkmoneyReceiptnumber?default('')}" readonly="true" >
            </div>
         </div>
        <div class="form-group">
            <label class="col-sm-3 control-label"><@ctx.i18n text = "出纳备注/备忘录"/>：</label>
            <div class="col-sm-8">
                <textarea name="checkmoneyMemo" class="form-control" readonly="true">${bpmCrmSubstitution.checkmoneyMemo?default('')}</textarea>
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-3 control-label"><@ctx.i18n text = "订单生效日"/>：</label>
            <div class="col-sm-8">
                <div class="input-group date">
                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    <input class="form-control" name="orderTakeEffectTime"  data-type="date" data-format="yyyy-MM-dd" value="${(bpmCrmSubstitution.orderTakeEffectTime?string('yyyy-MM-dd'))!}" type="text" readonly="true" />
                </div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label"><@ctx.i18n text = "收款日"/>：</label>
            <div class="col-sm-8">
                <div class="input-group date">
                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    <input class="form-control" name="collectionTime"  data-type="date" data-format="yyyy-MM-dd" value="${(bpmCrmSubstitution.collectionTime?string('yyyy-MM-dd'))!}" type="text" readonly="true" />
                </div>
            </div>
        </div>
        <div class="form-group"><label class="col-sm-3 control-label"><@ctx.i18n text = "利息率"/>：
           </label>
            <div class="col-sm-8"><input name="interestRate" class="form-control" type="text" value="${bpmCrmSubstitution.interestRate?default('')}" readonly="true">
            </div>
         </div>
        <div class="form-group">
            <label class="col-sm-3 control-label"><@ctx.i18n text = "财务经理审核"/>：</label>
            <div class="col-sm-8">
                  <@form.radio name="financeManagerReview" dictType="sys_bpm_crm_passorclose" value="${bpmCrmSubstitution.financeManagerReview?default('')}" readOnly="true"/>
            </div>
        </div>
        <div class="form-group"><label class="col-sm-3 control-label"><@ctx.i18n text = "经理复核"/>：
           </label>
            <div class="col-sm-8"><input name="managerReview" class="form-control" type="text" value="${bpmCrmSubstitution.managerReview?default('')}" readonly="true">
            </div>
         </div>
    </#if>


</@form.form>
</div>
<@footer>
<script type="text/javascript">
    var prefix = baseURL + "bpm/substitution"
    $("#form-substitution-add").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if (opt.validate.form()) {
            opt.operate.save(prefix + "/edit", $('#form-substitution-add').serialize());
        }
    }
    function isNullOrEmpty(value) {
        return value==''||value==null||value==undefined;
    }
</script>
</@footer>
</@pageTheme>